package com.wp.service.impl;
import com.wp.dao.SupplierDao;
import com.wp.entity.Supplier;
import com.wp.service.SupplierService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("supplierService")
public class SupplierServiceImpl implements SupplierService {

    @Resource
    private SupplierDao supplierDao;

    @Override
    public List<Supplier> findAll() {
        return supplierDao.findAll();
    }

    @Override
    public List<Supplier> findSupply(String supCode,String supName) {
        return supplierDao.findSupply(supCode,supName);
    }

    @Override
    public int toAdd(Supplier supplier) {
        return supplierDao.toAdd(supplier);
    }

    @Override
    public Supplier findById(Integer id) {
        return supplierDao.findById(id);
    }

    @Override
    public int del(Integer id) {
        return supplierDao.del(id);
    }

    @Override
    public int upd(Supplier supplier) {
        return supplierDao.upd(supplier);
    }
}
